package org.metasketch.editor.perspectives;

import javafx.scene.layout.BorderPane;
import javafx.scene.paint.Color;
import javafx.scene.shape.Rectangle;

import org.metasketch.editor.Editor;
import org.metasketch.editor.Project;

public class EmptyLayout implements ILayout {

	private Rectangle left;
	private Rectangle right;
	private Rectangle center;
	private Rectangle rightTop;

	public EmptyLayout() {
		left = new Rectangle(10, 10, Color.RED);
		rightTop = new Rectangle(10, 10, Color.YELLOW);
		right = new Rectangle(10, 10, Color.BLUE);
		center = new Rectangle(10, 10, Color.GREEN);
	}

	@Override
	public void setup(Project project) {

	}

	@Override
	public void apply(Object editorO) {
		if (editorO instanceof Editor) {

			// TODO Auto-generated method stub
			Editor editor = (Editor) editorO;

			// editor.getCenter().setCenter(center);

			// editor.getLeft().setTop(left);
			//
			// editor.getCenter().setCenter(center);

			editor.getRight().setTop(rightTop);
			// editor.getRight().setCenter(right);
		} else if (editorO instanceof BorderPane) {
			{

				BorderPane pane = (BorderPane) editorO;
				pane.setCenter(rightTop);

			}

		}

	}

	// @Override
	// public void setProject(Editor editor, Project project) {
	// // TODO Auto-generated method stub
	//
	// }

}
